home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 013 / hd312.arc / HDTEST.DOC < prev    next >
Encoding:
Text File  |  1987-02-24  |  54.9 KB  |  1,131 lines

  1.           
  2.           Documentation for HDTEST V3.12          Copyright 1987, P. R. Fletcher          ______________________________________________________________________
  3.           
  4.           
  5.                                   USER-SUPPORTED SOFTWARE                                  _______________________
  6.           
  7.           Much of the software which is available for your computer seems to be
  8.           produced and sold on the assumption that you are a crook, and will
  9.           take any available opportunity to cheat its creators and vendors out
  10.           of their rightful reward. It is copy-protected within an inch of its
  11.           (and your computer's) life and is still priced at a level which
  12.           guarantees its producers a profit even if four or five illegal copies
  13.           are made for each one sold. User-supported software is different. You
  14.           may have got a copy of this package free from a friend or a bulletin
  15.           board or (for a nominal fee) from a users' group or software library.
  16.           In any case, you have a perfectly legal copy. You are further
  17.           encouraged to make as many copies of the package as you like and to
  18.           distribute them to all your friends. However, if, after trying the                                               ________                     
  19.           program out, you find that it is useful and want to keep it and
  20.           continue using it, you must register your copy by sending the                                 ____                                  
  21.           registration fee ($30.00,) together with a completed registration
  22.           form, to the address on the form. If you continue to use the program
  23.           after an appropriate trial period (and the "Shareware" system lets you                                                                              ___ 
  24.           determine what is appropriate), you are breaking both the terms of the
  25.           license under which you have received the software and the law. You
  26.           may believe that the chances of the law of Copyright being enforced
  27.           against you are very low (and you may even be right!), and the
  28.           distributors of "user-supported" software do, in fact, usually have to
  29.           trust you to be honest and willing to pay a reasonable price for a
  30.           useful program. However, you should bear in mind that unsupported
  31.           "Shareware" software is likely either to cease to exist altogether or
  32.           to go commercial. The former eventuality benefits nobody - the latter
  33.           only the "middlemen". Many of the commercial software vendors also
  34.           apparently assume that you are a crook - you can decide whether you
  35.           want to prove them right. As a bonus, registered users will get a copy
  36.           of V4.10 of HDTEST, which includes a number of significant
  37.           enhancements over V3.12, and will be entitled to support and help with
  38.           HDTEST-related problems (including telephone support) for a year from
  39.           the date of registration. Additional features in V4.10 include support
  40.           for a wider variety of computer systems and storage media, more
  41.           detailed documentation of the meaning of HDTEST's sometimes rather
  42.           cryptic error messages, and a "fast" test mode.
  43.           
  44.           Documentation for HDTEST V3.12          Copyright 1987, P. R. Fletcher          ______________________________________________________________________
  45.           
  46.           
  47.            
  48.                                        INTRODUCTION                                       ____________
  49.           
  50.           This "Shareware" version of the HDTEST package may be copied and
  51.           distributed freely, provided that no changes are made to the programs
  52.           and/or documentation. The programs are fully functional, but they are
  53.           licensed to you for evaluation purposes only. If, after a reasonable                          ____________________________                        
  54.           trial period ("Shareware" gives you the right to determine what that                                          ___                                 
  55.           means), you decide that you wish to make HDTEST a permanent (or semi-
  56.           permanent) part of your software utility "toolkit", you must register                                                                  ____         
  57.           as a user by completing and returning the Registration Form which is
  58.           to be found at the end of this documentation, together with a check or
  59.           money order for the appropriate Registration Fee (U.S. $30.00, or
  60.           equivalent). Incidentally, if you try the package out and decide not                                                                            ___ 
  61.           to continue using it, I would appreciate it if you could drop me a
  62.           line explaining why you made that decision, particularly if the reason
  63.           is a bug or apparent bug in the program.
  64.           
  65.           HDTEST was written to allow comprehensive Read/Write testing of hard
  66.           disks on IBM PCs, XTs, ATs, and "true" compatibles. Although many
  67.           programs, including IBM's diagnostics, allow "surface scanning" and
  68.           seek testing of hard disks, none that are available to the average
  69.           user test whether the whole disk can retain the data that is or will
  70.           be written to it. HDTEST's principal "claim to fame" is the ability
  71.           thoroughly to test the surface of a hard disk which contains data
  72.           while preserving the data (although data loss is unavoidable if a          _________________________                                        
  73.           cluster which is in use has become unreadable).  HDTEST tests the disk                                               ____                             
  74.           much more thoroughly than programs such as DFixer, Mace, and Norton's
  75.           DT. Mace and DT, like many public domain "disk test" programs, simply
  76.           read every cluster on the disk and report on any errors encountered.
  77.           DFixer does better, writing 4 test patterns to every free cluster and
  78.           checking that they can be read back correctly, but it makes no attempt
  79.           to test clusters that are already in use - the very ones which contain
  80.           your precious data!
  81.           
  82.           HDTEST writes 20 different test patterns to every cluster on the disk                                                      _____                    
  83.           and checks that each pattern can be read back correctly, while
  84.           preserving the contents of the clusters that already contain data.
  85.           HDTEST can also (on most systems) detect errors which are minor enough
  86.           to be correctable (and corrected) by the disk controller's own "error-
  87.           correcting code" (ECC).  These errors are normally totally invisible
  88.           to programs running under DOS and will not usually be picked up by
  89.           other disk test utilities.  They may, however, be early signs of a
  90.           problem that will become significant later, and HDTEST will
  91.           consequently mark the offending cluster as bad. As long as HDTEST can
  92.           read the data from a flaky cluster correctly once (and it tries quite
  93.           hard) the program will be able to save the file of which that cluster
  94.           is a part intact, while marking the cluster so that DOS does not try                    ______                                                    
  95.           to use it again. The program was designed to minimize the likelihood
  96.           of user error causing data loss on a good (or slightly bad) disk, and
  97.           to be easy to use - it could not be designed to be fast, since
  98.           multiple bit patterns have to be written to and read from each
  99.           cluster, and this takes time. The program can be used to test single
  100.           and double-sided 8- and 9-sector floppy disks (if you have plenty of                                                                     ______   
  101.           patience!), as well as AT-format 1.2Mb floppies (with the same
  102.           proviso).
  103.           
  104.           
  105.           
  106.                                           Page 2
  107.           
  108.           Documentation for HDTEST V3.12          Copyright 1987, P. R. Fletcher          ______________________________________________________________________
  109.           
  110.           
  111.           HDTEST's companion program, HDCHEK, simply examines the logical
  112.           structure of the device and reports on what it finds. It does not
  113.           write to the disk, and is provided principally to allow a quick and
  114.           easy, but fairly reliable, check on the compatibility between HDTEST
  115.           and a given software/hardware configuration. In general, if HDCHEK                                                       ___________          
  116.           runs successfully on a system, then HDTEST can be expected to do so,
  117.           although the latter program does require more memory.
  118.           
  119.           The HDTEST package is distributed as "User-supported Software". If you
  120.           find it useful, you are asked to become a registered user by sending a
  121.           completed copy of the Registration Form (which is included in this
  122.           documentation), together with a check or money order for $30.00
  123.           ($40.00 Canadian, L25.00 Sterling) to me at the address which appears
  124.           on the form (and on the program's copyright screen). I will send you a
  125.           personalised copy of the latest, considerably enhanced, version of the
  126.           HDTEST package (V4.10), and register you for a year's support.
  127.           Registration entitles you to be notified of upgrades, bug fixes, newly
  128.           discovered incompatibilities, etc., and to ask for (and get) necessary
  129.           help in adapting the program to work on your hardware. I cannot guar-
  130.           antee to make HDTEST work with every possible combination of hardware
  131.           and software, but I will promise to try to solve problems as they come
  132.           up, and I will return your registration fee if I cannot support your
  133.           system.  Support will be available TO REGISTERED USERS ONLY by mail,                                             ________________________         
  134.           BIXmail, Compuserve EMail and, for an experimental period, telephone.
  135.           Please also bear in mind that my willingness and ability to continue
  136.           to support and enhance these programs will be directly dependent on
  137.           your willingness to pay the registration fee and (to some extent)
  138.           inversely dependent on the number of questions I get that could be
  139.           answered by reading the documentation(!).
  140.           
  141.           The HD programs were written principally in C, compiled by the
  142.           Microsoft C compiler (Version 4.00) using its "small" memory model,
  143.           and linked with code from the distributed Microsoft C object libraries
  144.           using the Microsoft LINK program (Version 3.51).  Additional assembly
  145.           language routines were assembled by the Microsoft MASM Macro Assembler
  146.           (Version 4.00). Portions of the distributed program are consequently
  147.           Copyright (C) by Microsoft Corp., 1985, 1986. All rights reserved.
  148.           These portions are used under the terms of a license from Microsoft
  149.           Corp.
  150.           
  151.           The HD programs were written with care and have been extensively
  152.           tested on a number of different systems.  I cannot, however, give any
  153.           guarantee as to their performance on a specific system, nor can I
  154.           accept liability for any actual or consequential loss resulting from
  155.           their use. The programs may only be used and/or copied in their
  156.           original form. Unauthorised modifications and/or the use of all or
  157.           part of the programs in other software, commercial or otherwise, are
  158.           strictly prohibited.
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.           
  169.           
  170.                                           Page 3
  171.           
  172.           Documentation for HDTEST V3.12          Copyright 1987, P. R. Fletcher          ______________________________________________________________________
  173.           
  174.           
  175.            
  176.                                       GETTING STARTED                                      _______________
  177.           
  178.           This section gives step by step instructions for running HDCHEK and
  179.           HDTEST on the C: drive of a standard IBM PC, XT, or 100% compatible.
  180.           Owners of ATs or AT clones may safely follow these instructions, too,
  181.           but proper testing of disks on these machines requires the /A command
  182.           line flag to be used, as discussed in later sections. The following
  183.           sections also go into much more detail about some of the program's
  184.           other features and options, and should help to explain and let you
  185.           deal with any problems which you may encounter.
  186.           
  187.           1) (If you obtained a copy of the package on a floppy disk) Use DOS's
  188.           DISKCOPY program to make a duplicate of the distribution disk, put the
  189.           original away in a safe place, and use the duplicate as your working
  190.           disk.
  191.           
  192.           2) Make sure that you have current backups of all the files on drive
  193.           C:. This is particularly important when running the HD program for the
  194.           first time on a new system.
  195.           
  196.           3) Run DOS's CHKDSK program on drive C: and correct any errors
  197.           reported by it before proceeding further.
  198.           
  199.           4) Make the drive and/or directory which contains HDCHEK.EXE and
  200.           HDTEST.EXE your current drive and/or directory.
  201.           
  202.           5) Insert a formatted, non-write-protected floppy disk in drive A. A
  203.           log file called HDTEST.LOG will be written to this disk - any other
  204.           files on it will be undisturbed.
  205.           
  206.           6) Give the command: "HDCHEK C:". After a certain amount of disk
  207.           activity has taken place, and certainly within a minute or two, your
  208.           screen should look like one of the examples given in Appendix B. If
  209.           any errors are reported, DO NOT PROCEED until you have read the rest                                   ______________                             
  210.           of the documentation and/or are sure you know what is going on.
  211.           
  212.           7) If HDCHEK reported no errors, give the command "HDTEST C: A:".             ____________________________                                  
  213.           After some disk activity, the program will prompt for replies to three
  214.           questions - press <Return> in response to each prompt. The program
  215.           will report its progress to the screen and will record any problems
  216.           encountered in the log file on the floppy disk. Depending on the size
  217.           of your DOS partition and the access time of the disk, a complete run
  218.           of HDTEST will take between 2 and 5 hours. Your intervention will only                                              _____                             
  219.           be required if a bad cluster is found in a "hidden", "system", or
  220.           write-protected file, when you will be asked to approve remapping;
  221.           otherwise, bad clusters will be automatically remapped. HDTEST can be
  222.           aborted at any time by pressing <Esc> and responding to the "Are you
  223.           sure...." prompt by pressing <Return>.
  224.           
  225.           8) If HDTEST finishes testing without finding any bad clusters, it
  226.           will simply record that fact and the finishing time in the log file
  227.           and return to the DOS prompt. Otherwise, when read/write testing has
  228.           been completed, you will be prompted for permission to complete the
  229.           remapping process by updating the disk FATs and Directories.  Pressing
  230.           <Return> will allow this to take place, and you will then be returned
  231.           to the DOS prompt.
  232.           
  233.           
  234.                                           Page 4
  235.           
  236.           Documentation for HDTEST V3.12          Copyright 1987, P. R. Fletcher          ______________________________________________________________________
  237.           
  238.           
  239.           
  240.           9) If HDTEST reported and remapped some bad clusters, see the section
  241.           on "Dealing with bad clusters" later in this documentation.
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.           
  297.           
  298.                                           Page 5
  299.           
  300.           Documentation for HDTEST V3.12          Copyright 1987, P. R. Fletcher          ______________________________________________________________________
  301.           
  302.           
  303.            
  304.                              HARDWARE & SOFTWARE REQUIREMENTS                             ________________________________
  305.           
  306.           HDTEST and HDCHEK make a number of assumptions about the environment
  307.           in which they are operating. They will, generally speaking, abort with
  308.           an informative error message if they find one of these assumptions to
  309.           be untrue! They require MS/PC-DOS 2.x or above and (for HDTEST) up to
  310.           about 256 Kb of free memory (the exact amount required depends on the
  311.           characteristics of the device being tested) to run - the presence of
  312.           more memory may (slightly) increase HDTEST's speed when testing
  313.           devices with large cluster sizes. The device to be tested must have
  314.           been initialized by FDISK and FORMATted by the DOS utility; only the
  315.           first DOS partition of a multi-partition disk will be tested.  For this
  316.           reason, if you wish to test a new hard disk which is to contain                                 ____                                    
  317.           multiple partitions, you should first configure it as a single DOS
  318.           partition, test it in that configuration, and then reconfigure it to
  319.           its final form. Note that, under these circumstances, HDTEST is only a                                                                          ____  
  320.           test - when you repartition the disk, any remapping and/or marking of
  321.           bad clusters which it may have done is lost. The BIOS handler for
  322.           interrupt 13 must be capable of handling (at least) normal disk reads
  323.           and writes (sub-functions 2 and 3) in a way that is compatible with
  324.           that documented for the XT and AT disk adapters in IBM's technical
  325.           documentation. This should be no problem for most disk systems on IBM
  326.           PCs and most compatibles.  HDTEST may not, however, be usable with
  327.           non-bootable hard disks and/or with hard disks which require special
  328.           device drivers to be installed.
  329.           
  330.           If run under DOS 3.0 or above, HDTEST attempts to locate and use the
  331.           ROM BIOS INT 13 entry point, rather than the normal INT 13 vector
  332.           (which DOS 3.x intercepts and interferes with). By default, unless the
  333.           /A or /D flag is set, the program assumes that, if a ROM is present at                                                          ___________________   
  334.           absolute address C8000H, it contains the hard disk BIOS and has                                                                  ___    
  335.           initialization code starting at offset 3. This assumption is true for
  336.           all hard disks which "plug in" to the IBM PC and XT. It may not be
  337.           true for all clones which come with hard disks installed, although it
  338.           is likely to be true for most of them. The AT and some of its clones
  339.           have no ROM at all at this location, which is OK, too, even if you
  340.           forget to use the /A flag (but see para 5 in the "Limitations and
  341.           Restrictions" section). Problems (up to and including system halts)
  342.           may occur if neither flag is set and there is a ROM at C8000H but it                                                     __                       
  343.           does not control the hard disk. They are almost guaranteed if the               ___                                                         
  344.           initialization code does not start at offset 3 in the ROM. If you have
  345.           problems running HDCHEK and HDTEST on such systems, try running the
  346.           programs with the /D flag (for PCs and XTs) or the /A flag (for ATs).
  347.           
  348.           Note that, since HDTEST remaps bad clusters to free space, there is
  349.           not much point in running it on a disk which has none (as shown by
  350.           DIR or CHKDSK), since it will abort immediately if it finds a bad
  351.           cluster.  Unless you have a really flaky disk, however, you should not
  352.           need more than a couple of hundred Kb free to remap any reasonably
  353.           probable number of bad clusters.
  354.           
  355.           ANSI.SYS should be installed on those systems (including the IBM
  356.           family) which do not support ANSI screen I/O in Video BIOS - nothing
  357.           terrible will happen if ANSI.SYS is not installed, but the screen
  358.           display will be very strange (!!).
  359.  
  360.           
  361.           
  362.                                           Page 6
  363.           
  364.           Documentation for HDTEST V3.12          Copyright 1987, P. R. Fletcher          ______________________________________________________________________
  365.           
  366.           
  367.           
  368.                                LIMITATIONS AND RESTRICTIONS                               ____________________________
  369.           
  370.           The current version of HDTEST has a few limitations, most of which
  371.           result from the way data is stored internally by the program. None of
  372.           them are "etched in stone", although some could only be avoided at the
  373.           cost of slowing down what is already far from a fast process. The
  374.           known limitations are as follows:
  375.           
  376.           1) Maximum number of clusters per disk = 24,000 (this number is
  377.           approximate, because it depends on dynamic memory allocation). This
  378.           limit may be increased to 32,768 in a subsequent version of the
  379.           program.
  380.           
  381.           2) Maximum cluster size = 65,528 bytes. I do not believe that a DOS
  382.           disk can ever have clusters larger than 64 Kb, but my limit is a few
  383.           less than that and may, since sector and cluster sizes tend to run in
  384.           powers of 2, effectively limit cluster size to 32 Kb - this should be
  385.           enough for most people!.
  386.           
  387.           3) Because of certain inherent limitations in the chips used to
  388.           support direct memory access (DMA, the method used to transfer data
  389.           from disk to memory and vice versa), HDTEST may be unable to use free
  390.           memory efficiently when cluster sizes are large. This can result in
  391.           "Insufficient Memory" or "Memory Allocation" errors, even on systems
  392.           with more than the minimum 256 Kb of free memory prescribed above. The
  393.           only cure for this is to free up (or buy!) more memory (remove
  394.           RAMdisks, remove resident software, etc.).
  395.           
  396.           4) The current version of HDTEST will run on ATs and some AT clones,
  397.           but may not, even with the /A flag set, be able to detect corrected
  398.           ECC errors when run on some of the clones - a warning message will be
  399.           displayed when the program initializes itself if corrected ECC errors
  400.           are not being detected.  The program will also not detect corrected
  401.           ECC errors when invoked with the /D flag (under DOS 3.0 or above).
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.           
  425.           
  426.                                           Page 7
  427.           
  428.           Documentation for HDTEST V3.12          Copyright 1987, P. R. Fletcher          ______________________________________________________________________
  429.           
  430.           
  431.            
  432.                                    RUNNING THE PROGRAMS                                     ____________________  
  433.           
  434.           Always run HDCHEK on any new hardware/software configuration before
  435.           you attempt to run HDTEST (at least the first time). The latter
  436.           program has been written as conservatively as possible, but it is not
  437.           possible to predict the behavior of every conceivable combination of
  438.           hardware and operating system when dealing with a program which
  439.           bypasses most of the controls which normally protect the user from
  440.           destroying his world. HDCHEK is invoked with the command line:
  441.           
  442.                           HDCHEK device [/A] [/D]
  443.           
  444.           "device" is the device to be tested (e.g. A:, B:, etc. - the colons
  445.           are permitted but not required).                            ___           
  446.           
  447.           The /A(T) flag is used to tell the HD program that it is being run on
  448.           an AT or AT-clone (which has its hard disk BIOS in a ROM at F0000H,
  449.           rather than C8000H).
  450.           
  451.           The /D(OS interrupt) flag has no effect under DOS 2.x.  Under DOS 3.0
  452.           or above, it forces HDCHEK to use the existing INT 13 vector (which it
  453.           always does under DOS 2.x), and prevents the program from trying to
  454.           determine the ROM BIOS entry point; the flag should be used if you
  455.           know that your system's fixed disk BIOS does not follow IBM's "rules"
  456.           or if the program crashes the system when invoked without it.
  457.           
  458.           After a short delay, during most of which the specified device will be
  459.           active, a description of the device's logical structure will be disp-
  460.           layed.  After a further delay, and more disk activity, a message will
  461.           be printed giving the number of files and subdirectories found on the
  462.           disk, and the program will exit back to DOS. Note that the total
  463.           number of files and subdirectories reported by HDCHEK will be greater
  464.           than the sum of the counts reported by CHKDSK. This is because HDCHEK
  465.           counts the "." and ".." entries in subdirectories and CHKDSK doesn't.
  466.           
  467.           Errors and/or problems encountered, if any, will be reported on in
  468.           some detail. A number of example screen displays and log files
  469.           produced by running HDCHEK (and HDTEST) on different systems will be
  470.           found in Appendix B at the end of this documentation.
  471.           
  472.           Always run the DOS CHKDSK program immediately before running HDTEST on
  473.           a disk. If CHKDSK reports any problems, its /F option (or other means)
  474.           should be used to correct them before HDTEST is run.                                         ____________________ 
  475.           
  476.           HDTEST is invoked with the command line:
  477.           
  478.               HDTEST device1 [device2] [/A] [/B] [/D] [/N] [/P] [/Snnnnn]
  479.           
  480.           "device1" is the device to be tested, as for HDCHEK. "device2" (which,
  481.           if present, must be different from "device1") is the name of a device
  482.           on which a log file (called HDTEST.LOG) is to be written. If "device2"
  483.           is not specified, errors are reported to the console terminal and                                                                        ___
  484.           should not be redirected.          ________________________ 
  485.           
  486.           The /A and /D flags have the same meaning and effect that they do for
  487.           HDCHEK.
  488.           
  489.           
  490.                                           Page 8
  491.           
  492.           Documentation for HDTEST V3.12          Copyright 1987, P. R. Fletcher          ______________________________________________________________________
  493.           
  494.           
  495.           
  496.           The /B(oot/Partition sector test) flag forces the program to include
  497.           the boot/partition sector (track 0, head 0, sector 1) in the DOS area
  498.           for the purposes of read/write testing. The default action is only to
  499.           perform read and seek tests on this sector, even if read/write testing
  500.           of the DOS area is specified. Since the boot/partition sector is
  501.           effectively read-only under normal circumstances (it is only written                                                                       _______
  502.           to during low-level formatting and by FDISK), read/write testing is          __                                                                 
  503.           less vital than for the rest of the disk. In addition, at least one
  504.           hard disk controller (a Western Digital board which allows a single
  505.           physical disk to be divided into two logical disks) will not allow
  506.           test patterns to be written to this sector.
  507.           
  508.           The /N(o Query) flag disables the individual prompts for confirmation
  509.           which the program normally issues before remapping clusters which are
  510.           marked as "Reserved" or which are part of a file which is marked as
  511.           "System", "Hidden", or "Readonly".  The /N flag does not prevent the                                                               ___            
  512.           program from prompting for confirmation before updating the disk.
  513.           
  514.           The /P(rint) flag causes the log file to be directed to the PRN device
  515.           (normally LPT1), and overrides any "device2" specification.
  516.           
  517.           The /S(tart) flag causes HDTEST to start testing occupied clusters at                                                           ________            
  518.           cluster number nnnnn (expressed as a decimal number). There must be no
  519.           space between the "S" and the number. This option will mainly be
  520.           useful when a previous run of HDTEST was interrupted (by pressing
  521.           <Esc>), since it allows you to start where you left off. Note that, in
  522.           order to be sure that data is not remapped to a bad area, HDTEST
  523.           always tests all empty clusters before starting to test occupied          ______       ___                                                
  524.           clusters. For this reason, using the /S flag will not result in a
  525.           large time saving if your disk is nearly empty, and will make the most
  526.           difference on a full, or nearly full disk.
  527.           
  528.           After displaying its copyright message, HDTEST reads the FATs and
  529.           scans the root directory and all subdirectory trees of the specified
  530.           device before initiating a short dialogue. All questions are of the
  531.           "Yes/No" type and should be answered by typing "Y" or "N" (case does
  532.           not matter) and pressing the <Return> key.  Pressing the <Return> key
  533.           alone is equivalent to giving the default response (which appears in
  534.           square brackets at the end of each prompt).  HDTEST then proceeds to
  535.           test the specified device. By default, the DOS area (boot sector,
  536.           FATs, and root directory) is not subjected to Read/Write testing,
  537.           since failures in this area usually make themselves apparent fairly
  538.           rapidly. The user can, however, choose to run these tests on the DOS
  539.           area too, or to limit testing to read and seek tests only over the
  540.           whole partition.
  541.           
  542.           In its reports to the screen, HDTEST uses the convention that read-
  543.           only testing is "Checking" while read/write testing is "Testing" - it
  544.           always "checks" the boot/partition sector and the rest of the DOS
  545.           area, but only "tests" them if requested to do so.
  546.           
  547.           In "checking" or "testing" a block (sector or cluster), HDTEST first
  548.           reads it (retrying, if necessary, up to five times) and then does the
  549.           longest possible seek away from it before attempting to read it again.
  550.           "Checking" is complete at this point. "Testing" continues with the
  551.           program sequentially writing 20 different bit patterns to the block
  552.           
  553.           
  554.                                           Page 9
  555.           
  556.           Documentation for HDTEST V3.12          Copyright 1987, P. R. Fletcher          ______________________________________________________________________
  557.           
  558.           
  559.           and checking that each one can be read correctly, before rewriting the
  560.           original contents of the block (and checking to ensure that it has
  561.           been restored correctly). Errors that occur at any point in this
  562.           process are reported and (if the block is in the data area - errors in
  563.           the DOS area are always treated as fatal) the block is remapped. If an
  564.           error is detected in a "Reserved" cluster or in one that is part of a
  565.           file which is marked as "System", "Hidden", or "Readonly", the user is
  566.           normally asked for confirmation before the cluster is remapped,
  567.           otherwise it is assumed that remapping is desirable.
  568.           
  569.           HDTEST keeps a copy of the FAT and a map of the device's directory
  570.           structure in memory. A bad cluster is remapped by transferring its
  571.           contents to a free cluster and (if it was in use) changing all
  572.           necessary FAT and directory entries so that the pointer chain which
  573.           maintains the structure of the affected file or subdirectory remains
  574.           valid. The bad cluster's FAT entry is then altered to identify it as
  575.           bad to DOS. The disk's FATs and directories are not altered until the                          ______                                               
  576.           whole disk has been scanned, and then only after the user has
  577.           confirmed that it is OK to proceed. This means that a power failure
  578.           and/or an inadvertent power-off which occurs while the program is
  579.           running will cause the loss of, at most, one cluster of data and of no
  580.           FAT or root directory information (unless you are very unlucky and it                                                            ____               
  581.           happens after you have confirmed that you want a damaged data area to
  582.           be remapped and while this is being done). If a power failure and/or
  583.           power-off occurs while a cluster which contains the directory
  584.           information of a subdirectory is being tested, part or all of that
  585.           subdirectory will probably become inaccessible to DOS, although the
  586.           data in it will remain on the disk and be potentially recoverable with
  587.           the aid of (e.g.) the Norton Utilities (TM).
  588.           
  589.           You can safely interrupt the testing process part way through (by
  590.           pressing the <Esc> key) with no risk of leaving a partially updated
  591.           FAT or directory. If you do interrupt the program in this way, you
  592.           will still be given the option of updating the disk, so that bad
  593.           clusters which were detected before <Esc> was pressed can be remapped.
  594.           
  595.           Errors which occur in the program's initialization phase cause it to
  596.           abort with an error message and (sometimes) a hexadecimal error code.
  597.           The meaning of the error code is context-dependent. Errors detected
  598.           during read-write testing only cause the program to abort if they
  599.           occur during testing of the DOS area, or if remapping is impossible
  600.           (only likely to happen if the disk is full). In any event, a
  601.           description of the error is written to the log file (if any) or to the
  602.           screen. This specifies the cluster or (for the DOS area) sector
  603.           number and the name of the affected file (if any), and defines the
  604.           type(s) of error which occurred.
  605.           
  606.           HDTEST takes a very long time to run to completion because of the                         ____                                              
  607.           large number of reads and writes it does for each cluster. A typical
  608.           time for an XT disk (10 Mb) would be 2 hrs; full disk testing on a 30
  609.           Mb AT Plus takes at least 4 hrs.
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.           
  617.           
  618.                                          Page 10
  619.           
  620.           Documentation for HDTEST V3.12          Copyright 1987, P. R. Fletcher          ______________________________________________________________________
  621.           
  622.           
  623.            
  624.                                  DEALING WITH BAD CLUSTERS                                 _________________________
  625.           
  626.           It is, unfortunately, not unusual for a new hard disk to have a small,                                                                           ______ 
  627.           constant, number of bad clusters. IBM's quality control standards          ________                                                         
  628.           allow, for example, 5% of the surface area of a disk to be bad (!).
  629.           These bad clusters, which correspond to imperfections in the magnetic
  630.           coating on the disk, will normally be detected and marked by the DOS
  631.           FORMAT program and HDTEST will report them as "already marked as bad".
  632.           This should not be regarded as evidence of any real problem with the
  633.           disk, although some suppliers (not including IBM) will replace such                                         ___                                 
  634.           disks under warranty if pressed to do so.  It is also not unusual for
  635.           a disk to develop a few more defects as it ages. When these do                              ___                                       
  636.           develop, they are also usually constant in size and position, and will
  637.           be reported as "already marked as bad" by HDTEST on runs subsequent to
  638.           that during which they are first found. The occasional appearance (and                                                      __________                
  639.           subsequent persistence) of a new bad cluster is, therefore, not
  640.           necessarily evidence of serious trouble developing.  However, if more
  641.           than one or two new bad clusters are reported by HDTEST, and
  642.           especially if two consecutive runs of HDTEST report different bad                                                              _________    
  643.           clusters, there is a good chance that the hard disk or controller is
  644.           developing a serious problem - the disk should be backed up
  645.           immediately and the system sent for repair at the earliest opportunity.
  646.           
  647.           New bad clusters in the data area are automatically mapped out by
  648.           HDTEST, and no further action is necessary. Bad sectors in the DOS
  649.           area can be handled in two ways:
  650.           1) If you are able to do a low-level format on your hard disk (most                                     _________                               
  651.           makers of "add-on" hard disks supply a method of doing this, either in
  652.           the form of a short program, or by giving instructions for running a
  653.           program in the ROM BIOS from DEBUG), back up the entire hard disk                                                           ______          
  654.           (including any non-DOS partitions), run the low-level format, use
  655.           FDISK to repartition the disk, and then run the DOS FORMAT program. If
  656.           HDTEST now reports no errors in the DOS area you can restore all your
  657.           files and continue to use the disk. You should, however, use HDTEST to
  658.           test (at least) the DOS area fairly frequently for a month or so to be
  659.           sure that the problems are not going to recur.
  660.           2) If you do not have the wherewithal to do a low-level format, or if
  661.           you follow the above instructions and HDTEST continues to report bad
  662.           sectors in the DOS area, your only other choice is to back up the DOS
  663.           partition, reconfigure the disk with FDISK so that the new DOS
  664.           partition starts above the bad area, reFORMAT it, and restore all of
  665.           the old files to the new DOS partition (which will unavoidably be a
  666.           little smaller than the old).
  667.           
  668.           If absolute sector zero (track 0, Head 0, sector 1) really becomes
  669.           bad, the disk must be replaced. This sector is only subjected to
  670.           read/write testing if the /B flag is specified on the command line, so          __________                                                            
  671.           any reported errors (in sector -1) during normal testing represent a                                         __                                   
  672.           problem reading the sector and are likely to be significant. Problems                  _______                                                      
  673.           encountered during read/write testing of this sector do not always                                                                  ___       
  674.           indicate a bad disk - certain controller cards may not allow test
  675.           patterns to be written to it, resulting in multiple errors on
  676.           read/write testing. Consequently, if multiple errors are reported on
  677.           read/write testing of this sector, but read-only testing proceeds
  678.           without problems and the rest of the disk seems to be OK, there is
  679.           probably no cause for concern.
  680.           
  681.           
  682.                                          Page 11
  683.           
  684.           Documentation for HDTEST V3.12          Copyright 1987, P. R. Fletcher          ______________________________________________________________________
  685.           
  686.           
  687.            
  688.                             BUGS AND OTHER UNPLEASANT SUBJECTS                            __________________________________
  689.           
  690.           Although, like all programmers, I like to think that my product is
  691.           perfect, it is possible that there are a few bugs lurking in the
  692.           depths of the program, and likely that some combination of software
  693.           and hardware exists which HDTEST cannot figure out and/or cope with.
  694.           If you think you have found a bug and/or if you cannot get either of
  695.           the programs to work on your system, do the following:
  696.           
  697.           1) Reread this documentation! Make sure that you are doing exactly
  698.           what the documentation says to do. Make sure (if you are testing a
  699.           drive with removable media) that the media is not write-protected.
  700.           
  701.           2) Boot your system from a "virgin" DOS disk - preferably a copy of
  702.           your DOS distribution disk - and try to run the HD programs again. If
  703.           they run in this environment but not in your normal DOS environment,
  704.           try reconstructing the system under which they failed by adding things
  705.           one by one until the problem recurs. If you find a specific piece of
  706.           software which causes the trouble, let me know about the
  707.           incompatibility.
  708.           
  709.           3) If the above approaches do not help, or if HDCHEK runs but HDTEST
  710.           bombs (the reverse should never happen), send me as detailed a
  711.           description of the problem as possible and, if you are a Registered                                                      _______________________
  712.           User, I will do my best to diagnose and fix it. A bug report should          _____                                                              
  713.           always include a full description of the system being used, as well as          ______           ____                                                 
  714.           the output from a run of HDCHEK.
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.  
  734.  
  735.  
  736.  
  737.  
  738.  
  739.  
  740.  
  741.  
  742.  
  743.  
  744.           
  745.           
  746.                                          Page 12
  747.           
  748.           Documentation for HDTEST V3.12          Copyright 1987, P. R. Fletcher          ______________________________________________________________________
  749.           
  750.           
  751.            
  752.                               CHANGES FROM PREVIOUS VERSIONS                              ______________________________
  753.           
  754.           The first version released (other than beta-test versions) was V2.60.
  755.           
  756.           
  757.           Version 3.12 (this version) -
  758.           
  759.           The following (visible) changes have been made in HDCHEK:
  760.           
  761.           1) Minor bug in V2.60 (which resulted in a failed directory scan if
  762.           HDCHEK was run on a write-protected device) fixed (at V2.71).
  763.           
  764.           2) /A option for full functionality on ATs and AT clones added (at
  765.           V3.00).
  766.           
  767.           The following (visible) changes have been made in HDTEST:
  768.           
  769.           1) Bug in V2.60 (which could cause bad termination of the program and
  770.           possible subdirectory inconsistencies if a sector which was not in use
  771.           was found to be bad) fixed (at V2.70).
  772.           
  773.           2) Bug in V2.70 (which caused the program to enter a terminal input
  774.           loop if ANSI.SYS was not loaded and <Esc> was entered to abort it)
  775.           fixed (at V2.73).
  776.           
  777.           3) Assorted minor bugs and deficiencies in error reporting and
  778.           termination routines fixed (V3.00 to V3.11).
  779.           
  780.           4) Bug causing improper handling of multiple corrected ECC errors on
  781.           first read fixed (at V3.12).
  782.           
  783.           5) Internal changes made to avoid interference with expanded memory
  784.           device handlers (at V2.72).
  785.           
  786.           6) Disk reset before retry on all errors enabled (at V3.00).
  787.           
  788.           7) Absolute limit on number of files and directories on device removed
  789.           (at V3.00).
  790.           
  791.           8) Ability to update disk after program terminated by user (typing
  792.           <Esc>) added (at V2.70).
  793.           
  794.           9) Total sector or cluster count shown on screen during testing along
  795.           with current sector or cluster number (at V3.01).
  796.           
  797.           10) /S option to start checking occupied clusters at a given cluster
  798.           number added (at V2.70).
  799.           
  800.           11) /A option for full functionality on ATs and AT clones added (at
  801.           V3.00).
  802.           
  803.           12) /B option to include the boot/partition sector in the DOS area for
  804.           the purposes of read/write testing added. This sector was previously
  805.           automatically included in the DOS area. (added at V3.00)
  806.  
  807.  
  808.           
  809.           
  810.                                          Page 13
  811.           
  812.           Documentation for HDTEST V3.12          Copyright 1987, P. R. Fletcher          ______________________________________________________________________
  813.           
  814.           
  815.           
  816.                            APPENDIX A - SUMMARY OF FLAG SETTINGS                           _____________________________________
  817.           
  818.           /A(T) - used to tell the HD program that it is being run on
  819.           an AT or AT-clone (HDCHEK and HDTEST).
  820.           
  821.           /B(oot/Partition sector test) - used to include the hard disk
  822.           boot/partition sector in the DOS area for the purposes of read/write
  823.           testing (HDTEST only).
  824.           
  825.           /D(OS interrupt) - forces the program to use the existing INT 13
  826.           vector.  This is the default under DOS 2.x (HDCHEK and HDTEST).
  827.           
  828.           /P(rint) - causes the log file to be directed to the PRN device
  829.           (HDTEST only).
  830.           
  831.           /N(o Query) - disables the individual prompts for confirmation which
  832.           the program normally issues before remapping "special" clusters - does
  833.           not prevent the program from prompting for confirmation before          ___                                                           
  834.           updating the disk (HDTEST only).
  835.           
  836.           /Snnnnn - causes HDTEST to start testing occupied clusters at                                                   ________            
  837.           cluster number nnnnn (expressed as a decimal number) (HDTEST only).
  838.           
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.  
  866.  
  867.  
  868.  
  869.  
  870.  
  871.  
  872.           
  873.           
  874.                                          Page 14
  875.      
  876.      Documentation for HDTEST V3.12          Copyright 1987, P. R. Fletcher     ______________________________________________________________________
  877.      
  878.      
  879.  
  880.                    APPENDIX B - EXAMPLE PROGRAM RUNS                   _________________________________
  881.  
  882.      Screen display from successful run of HDCHEK on 14 Mb DOS partition of
  883.      20 Mb hard disk:
  884.  
  885. Device C: is the DOS partition of a hard disk.
  886. It contains 29104 sectors.
  887. Total partition size is approximately 14 Mb.
  888. It starts at absolute sector 8364 on the disk.
  889. There are 4 heads and 17 sectors/track.
  890. Sector size is 512 bytes.
  891. Each (12 bit) FAT occupies 11 sectors.
  892. The Root Directory occupies 32 sectors.
  893. The data area starts at DOS sector 55, and contains 3631 clusters, each
  894. consisting of 8 sectors.
  895. The directory scan was successful; a total of 1018 files and subdirectories
  896. was found.
  897.  
  898.  
  899.  
  900.      Screen display from successful run of HDCHEK on DSDD 9-sector floppy disk:
  901.  
  902. Device A: is a floppy disk.
  903. The disk contains 720 sectors.
  904. There are 2 heads and 9 sectors/track.
  905. Sector size is 512 bytes.
  906. Each (12 bit) FAT occupies 3 sectors.
  907. The Root Directory occupies 7 sectors.
  908. The data area starts at DOS sector 12, and contains 354 clusters, each
  909. consisting of 2 sectors.
  910. The directory scan was successful; a total of 38 files and subdirectories
  911. was found.
  912.  
  913.  
  914.  
  915.      Screen display from run of HDCHEK on 14 Mb DOS partition - directory
  916.      structure bad or unrecognizable:
  917.  
  918. Device C: is the DOS partition of a hard disk.
  919. It contains 29104 sectors.
  920. Total partition size is approximately 14 Mb.
  921. It starts at absolute sector 8364 on the disk.
  922. There are 4 heads and 17 sectors/track.
  923. Sector size is 512 bytes.
  924. Each (12 bit) FAT occupies 11 sectors.
  925. The Root Directory occupies 32 sectors.
  926. The data area starts at DOS sector 55, and contains 3631 clusters, each
  927. consisting of 8 sectors.
  928. The preliminary directory scan failed.
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.      
  937.      
  938.                                     Page 15
  939.      
  940.      Documentation for HDTEST V3.12          Copyright 1987, P. R. Fletcher     ______________________________________________________________________
  941.      
  942.      
  943.  
  944.      Screen display from run of HDCHEK on 14 Mb DOS partition - FATs not
  945.      identical:
  946.  
  947. FATS are different
  948. FAT discrepancy at byte 20F - FAT 1 has FF; FAT 2 has F8
  949. Continue comparison (Y/N)? [Y]: n     {user input}                                _                 
  950.  
  951. Device C: is the DOS partition of a hard disk.
  952. It contains 29104 sectors.
  953. Total partition size is approximately 14 Mb.
  954. It starts at absolute sector 8364 on the disk.
  955. There are 4 heads and 17 sectors/track.
  956. Sector size is 512 bytes.
  957. Each (12 bit) FAT occupies 11 sectors.
  958. The Root Directory occupies 32 sectors.
  959. The data area starts at DOS sector 55, and contains 3631 clusters, each
  960. consisting of 8 sectors.
  961.  
  962.  
  963.  
  964.      Screen display from run of HDCHEK - program unable to deduce disk
  965.      structure - disk not recognizable as a DOS device:
  966.  
  967. Unrecognised media descriptor byte! - see error code
  968. Error Code = F1      {F1 is not a media descriptor byte used by DOS}
  969.      
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.      
  1001.      
  1002.                                     Page 16
  1003.      
  1004.      Documentation for HDTEST V3.12          Copyright 1987, P. R. Fletcher     ______________________________________________________________________
  1005.      
  1006.      
  1007.      
  1008.      Log file from successful run of HDTEST on 14 Mb DOS partition of 20 Mb hard
  1009.      disk:
  1010.      
  1011.      HDTEST Log File - Tue Jul 08 11:44:52 1986
  1012.      Testing Device C:
  1013.      
  1014.      No bad clusters found - HDTEST finished.
  1015.      Tue Jul 08 14:10:41 1986
  1016.      
  1017.      
  1018.      Log file from run of HDTEST on 14 Mb DOS partition - one bad cluster
  1019.      detected and remapped:
  1020.      
  1021.      HDTEST Log File - Tue Jul 08 11:44:52 1986
  1022.      Testing Device C:
  1023.      
  1024.      Read/Write error at cluster number 275!!
  1025.      Uncorrected ECC error occurred during pattern read/writes
  1026.      This error is recoverable (no data loss has occurred).
  1027.      Bad cluster is in file \MYFILES\DATA5\FFT1234.DAT
  1028.      
  1029.      1 bad clusters found and remapped - HDTEST finished.
  1030.      Tue Jul 08 14:01:04 1986
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064.      
  1065.      
  1066.                                     Page 17
  1067.      
  1068.      
  1069.                             REGISTRATION FORM - HDTEST V 3.12                            _________________________________
  1070.      
  1071.      Please complete this form and return it with a check or money order (no
  1072.      cash, please) for $30.00 ($40.00 Canadian, L25.00 Sterling) to:
  1073.      
  1074.                      Peter R. Fletcher
  1075.                      220 Ballard Drive
  1076.                      West Hartford
  1077.                      CT 06119
  1078.                      U.S.A.
  1079.      
  1080.      None of the information on this form will be passed on to any other
  1081.      individual or commercial organization. Use the back of the form for
  1082.      comments or additional space.
  1083.      
  1084.      --------------------------------------------------------------------------
  1085.      
  1086.      This information is required to process your Registration:
  1087.      
  1088.      Last Name:____________________________  Other Names:______________________
  1089.      
  1090.      Address:______________________________  Town/City:________________________
  1091.      
  1092.      State:_____________  Post Code:____________  Telephone:_________________
  1093.                                                            (evenings/weekends)
  1094.      
  1095.      I understand that this software is supplied without warranty, express or
  1096.      implied, and agree not to hold its author liable for any direct or
  1097.      consequential loss arising out of my use of it.
  1098.      
  1099.      Signature:______________________________
  1100.      
  1101.      -------------------------------------------------------------------------
  1102.      
  1103.      You are requested, but not required, also to answer the following
  1104.      questions:
  1105.      
  1106.      On What type(s) of computer are you using HDTEST? _________________________
  1107.      
  1108.      CPU (8088, 8086, etc.)? __________   Amount of RAM (kB)? ____________
  1109.      
  1110.      Type & Size of Hard Disk(s)? ____________________________________
  1111.      
  1112.      Make and Type of Hard Disk Controller(s)? ______________________________
  1113.      
  1114.      Do you own a Modem?                                             Y  N
  1115.      
  1116.      Are you a member of BIX?   Y  N        Compuserve?              Y  N
  1117.      
  1118.      Do you own or have access to a Cauzin Softstrip Reader          Y  N
  1119.      
  1120.      Did you think that the $30.00 registration fee for this program was:
  1121.      
  1122.      Very Good Value?              About Right?             Excessively High?
  1123.      
  1124.      
  1125.      Are there any other utility programs that you would like to see made
  1126.      available as "User Supported Software"? What sort of programs?
  1127.      
  1128.      
  1129.      
  1130.  
  1131.